//import 'dart:convert';
//
//UserInfoBean userInfoBeanFromJson(String str) =>
//    UserInfoBean.fromJson(json.decode(str));
//
//String userInfoBeanToJson(UserInfoBean data) => json.encode(data.toJson());
//
//class UserInfoBean {
//  UserInfoBean({
//    _account,
//    _createBy,
//    _createTime,
//    _id,
//    _name,
//    _nowPassword,
//    _password,
//    _phoneNo,
//    _status,
//    _updateBy,
//    _updateTime,
//  });
//
//  String account;
//  String createBy;
//  DateTime createTime;
//  String id;
//  String name;
//  dynamic nowPassword;
//  String password;
//  String phoneNo;
//  int status;
//  String updateBy;
//  DateTime updateTime;
//
//  factory UserInfoBean.fromJson(Map<String, dynamic> json) {
//    print(json);
//    UserInfoBean(
//      account: json["account"],
//      createBy: json["createBy"],
//      createTime: DateTime.parse(json["createTime"]),
//      id: json["id"],
//      name: json["name"],
//      nowPassword: json["nowPassword"],
//      password: json["password"],
//      phoneNo: json["phoneNo"],
//      status: json["status"],
//      updateBy: json["updateBy"],
//      updateTime: DateTime.parse(json["updateTime"]),
//    );
//  }
//
//  Map<String, dynamic> toJson() => {
//        "account": account,
//        "createBy": createBy,
//        "createTime": createTime.toIso8601String(),
//        "id": id,
//        "name": name,
//        "nowPassword": nowPassword,
//        "password": password,
//        "phoneNo": phoneNo,
//        "status": status,
//        "updateBy": updateBy,
//        "updateTime": updateTime.toIso8601String(),
//      };
//
//  @override
//  String toString() {
//    return 'UserInfoBean{account: $account, createBy: $createBy, createTime: $createTime, id: $id, name: $name, nowPassword: $nowPassword, password: $password, phoneNo: $phoneNo, status: $status, updateBy: $updateBy, updateTime: $updateTime}';
//  }
//}

class UserInfoBean {
  static String _account;
  static String _areaInfoStr;
  static String _areaName;
  static String _createBy;
  static String _createTime;
  static String _id;
  static String _name;
  static String _nowPassword;
  static String _password;
  static String _phoneNo;
  static int _role;
  static int _status;
  static String _updateBy;
  static String _updateTime;

  // 防止外界实例化
  UserInfoBean._();

  // 存储内部实例化对象
  static UserInfoBean _currentUserInfoBean = UserInfoBean._();

  // 向外界暴露内部的实例对象
  static UserInfoBean getInstance() => _currentUserInfoBean;

  UserInfoBean fromJson(Map<String, dynamic> json) {
    _account = json['account'];
    _areaInfoStr = json['areaInfoStr'];
    _areaName = json['areaName'];
    _createBy = json['createBy'];
    _createTime = json['createTime'];
    _id = json['id'];
    _name = json['name'];
    _nowPassword = json['nowPassword'];
    _password = json['password'];
    _phoneNo = json['phoneNo'];
    _role = json['role'];
    _status = json['status'];
    _updateBy = json['updateBy'];
    _updateTime = json['updateTime'];
    return this;
  }

  UserInfoBean getUserInfoBean() => this;

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['account'] = _account;
    data['areaInfoStr'] = _areaInfoStr;
    data['areaName'] = _areaName;
    data['createBy'] = _createBy;
    data['createTime'] = _createTime;
    data['id'] = _id;
    data['name'] = _name;
    data['nowPassword'] = _nowPassword;
    data['password'] = _password;
    data['phoneNo'] = _phoneNo;
    data['role'] = _role;
    data['status'] = _status;
    data['updateBy'] = _updateBy;
    data['updateTime'] = _updateTime;
    return data;
  }

  @override
  String toString() {
    return 'UserInfoBean{account: $_account, areaInfoStr: $_areaInfoStr, areaName: $_areaName, createBy: $_createBy, createTime: $_createTime, id: $_id, name: $_name, nowPassword: $_nowPassword, password: $_password, phoneNo: $_phoneNo, role: $_role, status: $_status, updateBy: $_updateBy, updateTime: $_updateTime}';
  }

  static String get updateTime => _updateTime;

  static String get updateBy => _updateBy;

  static int get status => _status;

  static int get role => _role;

  static String get phoneNo => _phoneNo;

  static String get password => _password;

  static String get nowPassword => _nowPassword;

  static String get name => _name;

  static String get id => _id;

  static String get createTime => _createTime;

  static String get createBy => _createBy;

  static String get areaName => _areaName;

  static String get areaInfoStr => _areaInfoStr;

  static String get account => _account;

  static set id(String value) {
    _id = value;
  }
}
